* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1, h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

h1 {
    text-align: center;
}

.section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}

#showAddFormBtn, #showTypeFormBtn {
    background: #2ecc71;
    color: white;
}

#showAddFormBtn:hover, #showTypeFormBtn:hover {
    background: #27ae60;
}

.form-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #ddd;
    display: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, select, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button[type="submit"] {
    background: #3498db;
    color: white;
}

.form-actions button[type="submit"]:hover {
    background: #2980b9;
}

.form-actions button[type="button"] {
    background: #95a5a6;
    color: white;
}

.form-actions button[type="button"]:hover {
    background: #7f8c8d;
}

.search-box {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.search-box input {
    flex: 1;
}

.search-box button {
    background: #3498db;
    color: white;
}

.search-box button:hover {
    background: #2980b9;
}

#resetBtn {
    background: #95a5a6;
}

#resetBtn:hover {
    background: #7f8c8d;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f2f2f2;
    font-weight: bold;
}

tr:hover {
    background: #f5f5f5;
}

.status-active {
    color: #27ae60;
    font-weight: bold;
}

.status-inactive {
    color: #e74c3c;
    font-weight: bold;
}

.action-btn {
    padding: 5px 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.action-btn:hover {
    background: #2980b9;
}

.loading {
    text-align: center;
    padding: 20px;
    display: none;
}

/* 图片相关样式 */
.image-preview {
    margin-top: 10px;
    width: 150px;
    height: 150px;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
}

.product-image-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.product-image-thumb:hover {
    transform: scale(1.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
}